package testreflect;

import java.lang.reflect.Constructor;

public class TestReflect {
	@SuppressWarnings("unchecked")
	public static void main ( String[] args ) throws Exception  {
		Class<T> c = (Class<T>) Class.forName("testreflect.T");
		Constructor t = c.getConstructor( 
				new Class[]{
						int.class, 
						int.class, 
						long.class
				} 
		);
		
		System.out.println(t.newInstance( new Object[]{1, 2, 3} ));
	}
}

class T {
	private int a;
	private int b;
	private long c;
	public T(int a, int b, long c) {
		this.a = a;
		this.b = b;
		this.c = c;
	}

	@Override
	public String toString () {
		return "a= " + a + " b= " + b + " c= " + c;
	}
}